<template>
	<view class="single-img" :class="singleImgStyle == 0 ? 'style-0':'style-1'">
		<view class="item" @click="util.goToLink(params[0].link)">
			<image mode="widthFix" :src="params[0].img_url" @error="imageError" class="image"></image>
		</view>
	</view>
</template>

<script>
	// 单图广告
	
	export default {
		name: 'SingleImg',
		props: {
			title: {
				type: String,
				default: '单图广告'
			},
			type: {
				type: String,
				default: 'single_img',
			},
			singleImgStyle: {
				type: Number,
				default: 0,
			},
			params: {
				type: Array,
				default: [],
			}
		},
		data() {
			return {
				
			}
		},
		created() {
			//console.log(this.params)
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">
	.single-img {

		.item {
			margin: 0;
			// vertical-align:bottom;
			.image {
				display: block;
				width: 100%;
				
			}
		}
	}
	.single-img.style-0 {
		
	}
	.single-img.style-1 {
		margin: 20rpx;
		border-radius: 20rpx;
		overflow: hidden;
	}
</style>
